#ifndef _HGEFLASH_H_
#define _HGEFLASH_H_

#include <hge.h>
#include <hgesprite.h>

#pragma comment(lib, "comsupp.lib")

class FlashPlayer;

enum {
	HGEFLASH_LOW = 0,
	HGEFLASH_MEDIUM,
	HGEFLASH_HIGH
};

class hgeFlash {
public:
	hgeFlash(void);
	~hgeFlash(void);
	
	bool Start(const HGE_CHAR *filename, float x, float y, float width, float height);
	
	void SetQuality(int byQuality);
	bool IsPlaying();	
	void Pause();
	void Unpause();
	void Back();
	void Rewind();
	void Forward();	
	void GotoFrame(int nFrame);
	int GetCurrentFrame();
	int GetTotalFrames();
	bool GetLoopPlay();
	void SetLoopPlay(bool bLoop);

	void Update(void);
	void Render(void);
	
protected:
	static HGE *hge;
	FlashPlayer *Player;
	hgeSprite *spr;

	float X, Y;
	float Width;
	float Height;
};

#endif
